SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
CREATE VIEW [SSB].[DetailsView] AS


SELECT fund, ft.FSType, dm.AccountName, dm.ReportDateNetAmount, dm.LocalCurrencyCode, dm.PeriodEndDate FROM ssb.DailyIncome_Dump dm
INNER JOIN ssb.IncomeType it ON it.AccountName = dm.AccountName
INNER JOIN  SSB.FSIncomeType ft ON ft.FSIncomeTypeId = it.FSIncomeTypeId
INNER JOIN  ssb.LocalCurrencyCode lc ON lc.LocalCurrencyCodeid = it.LocalCurrencyCodeId
AND dm.LocalCurrencyCode = lc.LocalCurrencyCode

GO
